
package romaremez.teachingSystem;

public class User {
    private String name;
    private String password;

    public String getPassword() {
        return password;
    }

    public User() {

    }

    public User(String name, String password) {
        this.name = name;
        this.password = password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object anObj) {
        if (anObj == null) {
            return false;
        }
        if (!(anObj instanceof User)) {
            return false;
        }
        User someUser = (User)anObj;
        return name.equals(someUser.name);
    }
}